package com.bw.home.model


import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object HomeModule {

    @Singleton
    @Provides
    fun getHomeApiService(retrofit: Retrofit):HomeApiService = retrofit.create(HomeApiService::class.java)

    @Singleton
    @Provides
    fun getHomeRepo(homeApiService: HomeApiService):HomeRepo{
        return HomeRepo(homeApiService)
    }
}